﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="FolioEditGrid.ascx.cs" 
Inherits="UILGestion.Admin.Proyecto.FolioEditGrid" %>



 <%@ Register assembly="WebLib" namespace="WebLib" tagprefix="lib" %>
 <input id="idProyecto" type="hidden" runat="server"/>



<asp:UpdatePanel ID="GridUpdatePanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>



 <asp:GridView ID="itemGridView" Runat="Server" 
                SkinID="GridView"
                DataKeyNames="idInternal" 
                onrowcancelingedit="CancelItem" 
                onrowediting="EditItem" 
                OnRowUpdating="UpdateItem" 
                ShowFooter="True">
                            
                            <Columns>
                            
                            <asp:TemplateField HeaderText="Documento" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="300px">
                            <ItemTemplate>
                            
                            <asp:Label ID="descripcionLabel" runat="server" BackColor="Transparent" 
                            Text='<%# Eval("documentoTipoStr")%>'/>
                            </ItemTemplate>
                            <EditItemTemplate>
                            <asp:Label ID="descripcionLabel" runat="server" BackColor="Transparent" 
                            Text='<%# Eval("documentoTipoStr")%>'/>
                            </EditItemTemplate>
                            <FooterTemplate>
                                <asp:DropDownList ID="documentoTipoDDL" runat="server"  Width="250px"></asp:DropDownList> 
                              </FooterTemplate>
                              
                              </asp:TemplateField>

                              <asp:TemplateField HeaderText="Serie" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="80px" ItemStyle-HorizontalAlign="Right">
                            <ItemTemplate>
                            
                            <asp:Label ID="serieLabel" runat="server" BackColor="Transparent" 
                            Text='<%# Eval("serie")%>'/>
                            </ItemTemplate>
                            <EditItemTemplate>
                            <asp:TextBox ID="serieTXT" runat="server" Width="100%"
                            Text='<%# Eval("serie")%>'/>
                            </EditItemTemplate>
                            <FooterTemplate>
                                <lib:Input ID="serieTXT" runat="server"  Width="100%" />
                              </FooterTemplate>
                              
                              </asp:TemplateField>

                             

                              <asp:TemplateField HeaderText="Inicio" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="80px" ItemStyle-HorizontalAlign="Right">
                            <ItemTemplate>
                            
                            <asp:Label ID="inicioLabel" runat="server" BackColor="Transparent" 
                            Text='<%# Eval("inicio")%>'/>
                            </ItemTemplate>
                            <EditItemTemplate>
                            <asp:TextBox ID="inicioTXT" runat="server" Width="100%" DataType="Int"
                            Text='<%# Eval("inicio")%>'/>
                            </EditItemTemplate>
                            <FooterTemplate>
                             <lib:Input ID="inicioTXT" runat="server" Width="100%"  DataType="Int" />
                            </FooterTemplate>
                              
                            </asp:TemplateField>

                              <asp:TemplateField HeaderText="Fin" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="80px" ItemStyle-HorizontalAlign="Right">
                            <ItemTemplate>
                            
                            <asp:Label ID="finLabel" runat="server" BackColor="Transparent" 
                            Text='<%# Eval("fin")%>'/>
                            </ItemTemplate>
                            <EditItemTemplate>
                            <lib:Input ID="finTXT" runat="server" DataType="Int"   Width="100%" Text='<%# Eval("fin")%>'/>

                            </EditItemTemplate>
                            <FooterTemplate>
                             <lib:Input ID="finTXT" runat="server" DataType="Int"  Width="100%" />
                            </FooterTemplate>
                              
                            </asp:TemplateField>

                            

                            <asp:TemplateField HeaderText="Activo" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="35px">
                            <ItemTemplate>
                            <asp:CheckBox id="bitActivoCHK" type="checkbox" runat="server" Enabled="false" checked= '<%# Eval("bitActivo")%>' disabled="disabled" />
                            </ItemTemplate>
                            <EditItemTemplate>
                            <asp:CheckBox id="bitActivoCHK" type="checkbox" runat="server" checked= '<%# Eval("bitActivo")%>'  />
                            </EditItemTemplate>
                            <FooterTemplate>
                             <asp:CheckBox id="bitActivoCHK" type="checkbox" runat="server"  />
                            </FooterTemplate>
                              
                            </asp:TemplateField>
                                                       
                              
                            <asp:CommandField ButtonType="Image" CancelImageUrl="~/Images/cancel.gif" 
                            EditImageUrl="~/Images/edit.gif" ShowEditButton="true" 
                            UpdateImageUrl="~/Images/update.gif" />
                            <asp:TemplateField >
                            
                            <ItemTemplate>
                            
                            <asp:ImageButton ID="lnkRemove" runat="server" BorderColor="Control"  
                                    CommandArgument='<%# Eval("idInternal")%>' OnClick="DeleteItem" 
                                    OnClientClick="return confirm('Usted quiere eliminar?')"  ImageUrl="~/Images/delete.gif"   />
                                    </ItemTemplate>
                                    
                                    <FooterTemplate>
                                    
                                    <asp:Button ID="addProvAdd" runat="server" OnClick="AddItem" Text="Añadir" CssClass="ms-crm-List-Header" />
                                    </FooterTemplate>
                                    </asp:TemplateField>
                                    



                              </Columns>
                              </asp:GridView>

</ContentTemplate>
</asp:UpdatePanel>





